package com.hxit.huaxiamelongarden.domin.po;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

/**
 * @ClassName Content
 * @Author 12694
 * @Date 2025/1/23 15:44
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("contents")
@Schema(name = "Content", description = "内容实体类")
public class Content {

    @Schema(description = "内容ID（主键，自增长）", example = "1")
    private int contentId;

    @Schema(description = "发布者ID（关联用户表）", example = "1001", required = true)
    private int userId;

    @Schema(description = "内容标题（不能为空）", example = "我的第一篇内容", required = true)
    private String title;

    @Schema(description = "内容正文（可以为空）", example = "这是内容的正文部分")
    private String content;

    @Schema(description = "附加媒体文件链接（图片、视频等，可以为空）", example = "http://example.com/media/image.jpg")
    private String mediaUrl;

    @Schema(description = "发布时间（默认为当前时间戳）", example = "2025-01-23 17:19:01")
    private Timestamp createdAt;

    @Schema(description = "更新时间（默认为当前时间戳，更新时自动更新时间）", example = "2025-01-23 17:19:01")
    private Timestamp updatedAt;
}
